Skip to content

feat: cora index + cora explore — symbol index & search (#264, #265)#281

Merged
ajianaz merged 2 commits into
developfrom
docs/roadmap-v0.6-v0.7
Jun 14, 2026
Merged

feat: cora index + cora explore — symbol index & search (#264, #265)#281
ajianaz merged 2 commits into
developfrom
docs/roadmap-v0.6-v0.7

Conversation

@ajianaz

@ajianaz ajianaz commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

v0.6 Code Intelligence — Phase 1 + 2

Implements the foundation for code intelligence: persistent symbol index and search.

#264cora index (Foundation)

Build a SQLite-backed symbol index with FTS5 full-text search.

cora index           # Build/update index (incremental)
cora index --stats   # Show statistics
cora index --prune   # Remove deleted files
cora index --rebuild # Drop and rebuild from scratch

Features:

  • Regex-based definition extraction for 6+ languages (Rust, Python, TS/JS, Go, Java, C/C++)
  • FTS5 virtual table with bm25 ranking
  • Incremental reindex via SHA-256 file fingerprints (skip unchanged files)
  • Respects .gitignore
  • SQLite schema v1 with auto-sync FTS5 triggers

Files:

File Lines Description
src/index/mod.rs 380 IndexEngine: open, index_file, index_project, prune, stats
src/index/schema.rs 130 SQLite schema + migrations
src/index/symbols.rs 370 SymbolKind, IndexedSymbol, SymbolQuery, search
src/index/extract.rs 380 Per-language regex extractors

#265cora explore (Query Layer)

cora explore "commit"               # FTS5 search
cora explore "Cache" --kind struct  # Filter by kind
cora explore --file src/index/      # Filter by file prefix
cora explore --json                 # JSON output

Runtime Verified

cora index     → 1303 symbols from 97 files, 416KB db
cora index     → second run: 0 indexed, 97 skipped (incremental ✅)
cora explore commit → 12 results with bm25 ranking
cora explore Cache --kind struct → exact kind filter

Tests

  • 543 total (20 new for index module)
  • Clippy clean, fmt clean
  • Dep: +rusqlite 0.31 (bundled SQLite)

Also includes

  • docs/roadmap.md updated with v0.6 + v0.7 plan

ajianaz added 2 commits June 14, 2026 11:15
v0.6 — Code Intelligence (3 issues):
  #264 cora index (foundation)
  #265 cora explore (query layer)
  #235 Uteke library integration

v0.7 — Multi-Language & Code Graph (4 issues):
  #266 cora callers/impact
  #267 cora affected (test impact)
  #268 language expansion 6→15+
  #269 auto-sync file watcher
## cora index (#264)
Build a persistent SQLite symbol index with FTS5 full-text search.

- src/index/mod.rs — IndexEngine: open, index_file, index_project, prune
- src/index/schema.rs — SQLite schema v1 with symbols, files, FTS5 + triggers
- src/index/symbols.rs — SymbolKind, IndexedSymbol, SymbolQuery, SearchResult
- src/index/extract.rs — regex-based definition extraction (Rust, Python, TS/JS, Go, Java, C/C++)
- Incremental reindex via SHA-256 file fingerprints (skip unchanged)
- Prune deleted files from index (--prune flag)
- Index stats (--stats): total symbols, files, by kind, by language
- Rebuild from scratch (--rebuild flag)
- Respects .gitignore via ignore crate

## cora explore (#265)
Search the symbol index with structural + FTS5 query.

- Text search via FTS5 (bm25 ranking)
- Filter by --kind, --file prefix, --language
- JSON output mode (--json)
- LIKE fallback when FTS5 returns nothing
- File path prefix filtering

## Runtime verified
  cora index       → 1303 symbols from 97 files, 416KB db
  cora index       → second run: 0 indexed, 97 skipped (incremental ✅)
  cora explore commit → 12 results with bm25 ranking
  cora explore Cache --kind struct → exact kind filter
  cora explore --file src/index/ → prefix filter

## Tests: 543 total (20 new for index module)
## Deps: +rusqlite 0.31 (bundled SQLite)
@ajianaz
ajianaz merged commit b1310fc into develop Jun 14, 2026
10 checks passed
@ajianaz
ajianaz deleted the docs/roadmap-v0.6-v0.7 branch June 14, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant